<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import OnlineStatusEnum from '@/framework/constant/OnlineStatusEnum'
import { refundOrderApi } from '@/feature/pay/infra/api/refundOrderApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: refundOrderApi,
        columns: [
          {
            label: '',
            prop: 'businessType',
            type: ColumnType.NUMBER
          },
          {
            label: '业务ID',
            prop: 'businessId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '退款订单号',
            prop: 'refundNo'
          },
          {
            label: '支付订单号',
            prop: 'payOutTradeNo'
          },
          {
            label: '订单总金额',
            prop: 'totalAmount'
          },
          {
            label: '退款金额',
            prop: 'refundAmount'
          },
          {
            label: '状态',
            searchable: true,
            type: ColumnType.RADIO,
            hiddenInForm: true,
            options: OnlineStatusEnum,
            prop: 'status'
          },
          {
            label: '',
            prop: 'refundId',
            type: ColumnType.SELECT
          },
          {
            label: '退款失败原因',
            prop: 'errMsg'
          },
          {
            label: '',
            prop: 'errCode'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

